<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'iColdStyle | Nguyễn Tuấn Anh',
	
	'theme'=>'classic',

	// preloading 'log' component
	'preload'=>array('log'),
	
	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
        'application.components.*',		
 		'application.extensions.url.*',             
        'application.utilities.*',
        'zii.widgets.CPortlet',		
	),
	'defaultController'=>'Site',
	'modules' => array(
				  'vesocp',
				),

	'components'=>array(			
      'user'=>array(
            'allowAutoLogin'=>true,
            'loginUrl' => array('/admin/adminUser/login'),
            'returnUrl' =>"hoidap/admin",
        ),
    

		// uncomment the following to enable URLs in path-format
		
		'urlManager'=>array(
			'urlFormat'=>'path',			
    		'showScriptName'=>false,
			'rules'=>array(           
                
                /*'ngay_quay-<ngay_quay>.html'=>'site/index',
                ''=>'site/index',
                'mien-nam.html'=>'site/miennam',
                'mien-bac.html'=>'site/mienbac',
                'mien-trung.html'=>'site/mientrung',
                'mien-bac-hom-qua.html'=>'site/lastmienbac',
                'mien-nam-hom-qua.html'=>'site/lastmiennam',
                'mien-trung-hom-qua.html'=>'site/lastmientrung',
                'thong-ke-nhanh.html'=>'thongke/index',
                'thong-ke-tan-suat.html'=>'thongke/tansuat',
                'thong-ke-tong-hop.html'=>'thongke/tonghop',
                'thong-ke-ngay.html'=>'thongke/date',
                'thong-ke-tong.html'=>'thongke/total',
                'thong-ke-dau-duoi-dac-biet.html'=>'thongke/dacbiet',
                'thong-ke-chu-ky-loto.html'=>'thongke/chukyloto',
                'thong-ke-chu-ky-dac-biet.html'=>'thongke/chuky',
                'thong-ke-loto-xien.html'=>'thongke/chukyLotoXien',
                'thong-ke-loto-gan.html'=>'thongke/lotogan',
                'thong-ke-tan-so-nhip-loto.html'=>'thongke/tansonhipLoto',
                'thong-ke-tong-hop-chu-ky-dac-biet.html'=>'thongke/tonghopChukyDacbiet',
                'thong-ke-dau-duoi-loto.html'=>'thongke/dauduoiloto',
                'thong-ke-dau-duoi-dac-biet-theo-bang.html'=>'thongke/dauduoidacbiet',
                'thong-ke-tan-suat-cap-loto-theo-bang.html'=>'thongke/tansuatCapLotoBang',
                'thong-ke-tan-suat-loto-theo-bang.html'=>'thongke/tansuatLotoBang',                
                'huong-dan-lodo-game.html'=>'lode/huongdan',
                'luat-choi.html'=>'lode/luatchoi',
                'giai-thuong.html'=>'lode/giaithuong',
                'dai-gia-lodo-game.html'=>'lode/daigia',
                'thanh-vien.html'=>'lode/thanhvien',
                'quay_thuong.html'=>'quaythuong/index',
                'du-doan.html'=>'dudoan/index',
                'con-so-may-man.html'=>'quayso/consomayman',
                'con-so-hop-menh.html'=>'quayso/consohopmenh',
                'con-so-dinh-menh.html'=>'quayso/consodinhmenh',
                'soi-cau-loto.html'=>'soicau/index',
                'soi-cau-dac-biet.html'=>'soicau/dacbiet',
                'soi-cau-hai-nhay.html'=>'soicau/cauhainhay',
                'so-mo.html'=>'dreambook/index',
                'dang-nhap.html'=>'profile/login',
                'dang-ky.html'=>'profile/register',
                'quen-mat-khau.html'=>'profile/forgetpass', 
                'mien-nam/<title>-p<id:\d+>.html'=>'ketqua/miennam',
                'mien-trung/<title>-p<id:\d+>.html'=>'ketqua/mientrung',
                'mo-thuong-gan-nhat-m<region>.html'=>'ketqua/ketqua5ngay',
                'mien-nam/mo-thuong-gan-nhat.html'=>'ketqua/miennam/hcm',
                'mien-bac/mo-thuong-gan-nhat.html'=>'ketqua/index/kqmb',
                'mien-trung/mo-thuong-gan-nhat.html'=>'ketqua/mientrung/dna',
                'truyen-thong.html'=>'ketqua/index',
                'dien-toan-123.html'=>'ketqua/dientoan123',
                'dien-toan-6x36.html'=>'ketqua/dientoan6x36',
                'than-tai.html'=>'ketqua/thantai',
                'in-ve-do.html'=>'print/index',
                'huong-dan-in.html'=>'print/huongdan',
                'ket-qua-mien-trung.html'=>'site/ketquamientrung',
                'ket-qua-mien-nam.html'=>'site/ketquamiennam',
                'trang-ca-nhan.html'=>'profile/index',
                'nhat-ky-lodo-game.html'=>'profile/nhatky',
                'thong-ke-trung-thuong.html'=>'profile/trungthuong',
                'thong-tin-cap-nhat.html'=>'profile/messengerbox',
                'lich-su-nap-tien.html'=>'profile/naptien',
                
                
                'dien-toan.html'=>'site/dientoan',
                'dien-toan-hom-qua.html'=>'site/lastDientoan',
                'ket-qua-dien-toan.html'=>'site/ketquadientoan',               
                'lo-game.html'=>'lode/loGame',
                'lodo-game.html'=>'lode/loGame',
                'do-game.html'=>'lode/doGame',
                'xien-game.html'=>'lode/xienGame',
                'doi-thuong.html'=>'lode/doiThuong',
                'phieu-thanh-toan.html'=>'lode/bill',
                'lich-su-giao-dich.html'=>'profile/lichsu',
                'thu-nhan.html'=>'messenger/index',
                'thu-gui.html'=>'messenger/sentMessenger',
                'gui-thu.html'=>'messenger/compose',
                'chi-tiet-thu.html'=>'messenger/detail',   
                'dang-ky-du-doan.html'=>'order/index',   
                'dang-ky-ket-qua.html'=>'order/dkketqua',   
                'tro-giup.html'=>'help/index',   
                'tro-giup-soi-cau.html'=>'help/soicau',   
                'tro-giup-ket-qua.html'=>'help/nhankq',   
                'tro-giup-doi-thuong.html'=>'help/doithuong',   
                'tro-giup-lo-game.html'=>'help/luatlo',   
                'tro-giup-do-game.html'=>'help/luatdo',   
                'tro-giup-xien-game.html'=>'help/luatxien',   
                'tro-giup-huong-dan-choi.html'=>'help/huongdanchoi',   
                'tro-giup-nap-tien.html'=>'help/naptien',   
                'tro-giup-bang-gia.html'=>'help/banggia',   
                'nap-tien-the.html'=>'profile/naptienThe'*/   
			),
		),
		
	'cache' => array (
		'class'=>'system.caching.CFileCache',
//    		'class' => 'CMemCache',
//   			'servers'=>array(
//        	array(
//            	'host'=>'localhost',
//            	'port'=>11211,
//        		'weight'=>100,
//        		),
//    		),
		),

   'db'=>array(
      'connectionString' => 'mysql:host=localhost;dbname=db_pm',
      'emulatePrepare' => true,
      'username' => 'root',
      'password' => '',
      'charset' => 'utf8',
	  'class'=>'CDbConnection',
		
    ),
    
//    'db'=>array(
//      'connectionString' => 'mysql:host=192.168.10.70;dbname=veso',
//      'emulatePrepare' => true,
//      'username' => 'hdc_dev',
//      'password' => 'hdc_dev',
//      'charset' => 'utf8',
//      'class'=>'CDbConnection',
//        
//    ),
	
         'authManager'=>array(
		    'class'=>'CDbAuthManager',
		    'connectionID'=>'db',
		 ),
  	
		
		'errorHandler'=>array(
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
	),
	'params'=>require(dirname(__FILE__).'/params.php'),
);
